#ifndef DEF_SCENE_MANAGER
#define DEF_SCENE_MANAGER

#include <windows.h>
#ifdef WIN32
#include <GL/glew.h>

#else
#define GL3_PROTOTYPES 1
#include <GL3/gl3.h>

#endif

#include <map>
#include <string>

#include <SDL/SDL.h>
#include "SceneModel.h"


class SceneManager
{
public:
	static SceneManager* Instance()
	{
		if(_instance == NULL)
			_instance = new SceneManager();
		return _instance;
	}

	virtual ~SceneManager();

	void LoadScene(std::string name);
	void Update();

	int GetWidth() { return _widthWindow; }
	int GetHeight() { return _heightWindow; }
	SDL_WindowID GetWindow() { return _window; }

	bool InitialiseWindow();
	bool InitGL();

private:
	static SceneManager* _instance;
	SceneManager();

	std::string _title;
	int _widthWindow;
	int _heightWindow;
	SDL_WindowID _window;
	SDL_GLContext _contextOpenGL;
	//SDL_Event _events;

	std::map<std::string, SceneModel*> _scenes;
	SceneModel* _currentScene;

};

#endif